coefficient_of_variation Function

public function coefficient_of_variation(a) result(cov)

Function to calculate the coefficient of variation of a real array

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout), dimension(:) :: a

A real array

Return Value real(kind=wp)

A real variable with the calculated coefficient of variation


Calls

proc~~coefficient_of_variation~~CallsGraph proc~coefficient_of_variation coefficient_of_variation proc~mean mean proc~coefficient_of_variation->proc~mean proc~std std proc~coefficient_of_variation->proc~std float float proc~mean->float proc~variance variance proc~std->proc~variance proc~variance->proc~mean

Source Code

    function coefficient_of_variation(a) result(cov)
!============================================================================================
!! Function to calculate the coefficient of variation of a real array
        real(kind=wp),dimension(:),intent(inout) :: a
!! A real array
        real(kind=wp) :: cov
!! A real variable with the calculated coefficient of variation
        cov=std(a)/mean(a);

    end function coefficient_of_variation